Emmanuele Bassi [Wed, 8 Apr 2020 14:26:14 +0000 (15:26 +0100)]
Improve the gtktypefuncs.inc generator
Remove the plug/socket exception, and add exceptions for non-X11
windowing systems.
Additionally, speed up the file generation by avoiding string
concatenation in Python.
Emmanuele Bassi [Tue, 7 Apr 2020 23:00:26 +0000 (00:00 +0100)]
Add missing transfer annotation
Emmanuele Bassi [Tue, 7 Apr 2020 22:33:54 +0000 (23:33 +0100)]
Turn GskRenderNode into a derivable type
Language bindings—especially ones based on introspection—cannot deal
with custom type hiearchies. Luckily for us, GType has a derivable type
with low overhead: GTypeInstance.
By turning GskRenderNode into a GTypeInstance, and creating derived
types for each class of node, we can provide an introspectable API to
our non-C API consumers, with no functional change to the C API itself.
Emmanuele Bassi [Tue, 7 Apr 2020 22:32:22 +0000 (23:32 +0100)]
Add macro for exported variables
The logic is based on the similar macro in GLib, but with the
appropriate GDK symbols.
Emmanuele Bassi [Wed, 8 Apr 2020 12:17:50 +0000 (12:17 +0000)]
Merge branch 'ci-meson-bump' into 'master'
ci: Update the version of Meson in our Docker image
See merge request GNOME/gtk!1651
Emmanuele Bassi [Wed, 8 Apr 2020 11:26:58 +0000 (12:26 +0100)]
ci: Update the version of Meson in our Docker image
Needed for !1017.
Matthias Clasen [Tue, 7 Apr 2020 20:30:43 +0000 (20:30 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Remove an unused backend includes
See merge request GNOME/gtk!1648
Matthias Clasen [Tue, 7 Apr 2020 19:27:51 +0000 (19:27 +0000)]
Merge branch 'imcontextsimple-drop-ifdefs' into 'master'
impcontextsimple: Drop ifdef'ed platform dependencies
See merge request GNOME/gtk!1647
Matthias Clasen [Tue, 7 Apr 2020 19:01:33 +0000 (15:01 -0400)]
Remove an unused backend includes
These includes are just leftovers.
Every time where we do an #ifdef GDK_WINDOWING... in gtk/,
something went wrong. Don't do it needlessly.
Matthias Clasen [Tue, 7 Apr 2020 18:54:04 +0000 (14:54 -0400)]
impcontextsimple: Drop ifdef'ed platform dependencies
The proper way to do this would be to adapt the tables
to have the right data for the platform. Since 4.0 is
a new start in many ways, lets clean this up.
Matthias Clasen [Tue, 7 Apr 2020 18:18:55 +0000 (18:18 +0000)]
Merge branch 'private-x11-types' into 'master'
Do not parse all GDK-X11 source files
See merge request GNOME/gtk!1646
Emmanuele Bassi [Tue, 7 Apr 2020 17:12:58 +0000 (18:12 +0100)]
Rename gdkx11keys.h
The header is now private, so it should follow the same naming scheme
for private GDK-X11 headers.
Emmanuele Bassi [Tue, 7 Apr 2020 17:10:01 +0000 (18:10 +0100)]
Hide GdkX11Keymap's GType function
It's not a public object.
Emmanuele Bassi [Tue, 7 Apr 2020 15:46:12 +0000 (16:46 +0100)]
Do not parse all GDK-X11 source files
We don't need all of them, only the ones that contain public API. This
allows us to reduce the chance of a stray symbol getting incorrectly
added to the introspection data.
Matthias Clasen [Tue, 7 Apr 2020 04:15:33 +0000 (04:15 +0000)]
Merge branch 'attribute-docs' into 'master'
entry: Document buildable support
See merge request GNOME/gtk!1643
Matthias Clasen [Tue, 7 Apr 2020 03:29:47 +0000 (23:29 -0400)]
entry: Document buildable support
Matthias Clasen [Tue, 7 Apr 2020 02:13:10 +0000 (22:13 -0400)]
entry: Add <attributes> support
Make entries support the same <attributes> syntax
as labels.
Closes: #1335
Matthias Clasen [Tue, 7 Apr 2020 01:46:12 +0000 (21:46 -0400)]
Move label attribute parser code
We want to reuse the parser for <attributes> in several
widgets, so move it to a shared place.
Matthias Clasen [Mon, 6 Apr 2020 23:59:33 +0000 (23:59 +0000)]
Merge branch 'cross-postinstall' into 'master'
meson: Don't execute post-install.py if cross compiling
See merge request GNOME/gtk!1636
Matthias Clasen [Mon, 6 Apr 2020 23:44:32 +0000 (23:44 +0000)]
Merge branch 'fix-event-match' into 'master'
shortcuttrigger: Don't trigger on key releases
See merge request GNOME/gtk!1642
Matthias Clasen [Mon, 6 Apr 2020 23:30:26 +0000 (23:30 +0000)]
Merge branch 'wip/chergert/fix-shortcut-param-order' into 'master'
widget: fix parameter ordering to match implementation
Closes #2586
See merge request GNOME/gtk!1641
Matthias Clasen [Mon, 6 Apr 2020 23:16:41 +0000 (19:16 -0400)]
shortcuttrigger: Don't trigger on key releases
This broke when the event type check in gdk_key_event_matches
was removed and replaced by a precondition that accepts both
key press and release events.
Add the check in gtk_keyval_trigger_trigger instead.
Christian Hergert [Mon, 6 Apr 2020 22:39:44 +0000 (15:39 -0700)]
widget: fix parameter ordering to match implementation
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2586
Matthias Clasen [Mon, 6 Apr 2020 21:05:52 +0000 (17:05 -0400)]
Replace most uses of <Primary> with <Control>
The only place where we are still using <Primary> is
in tests, to ensure we keep parsing it. Otherwise,
<Control> is now the preferred syntax.
Matthias Clasen [Mon, 6 Apr 2020 20:56:06 +0000 (20:56 +0000)]
Merge branch 'keymap-rework-2' into 'master'
Keymap rework 2
See merge request GNOME/gtk!1635
Matthias Clasen [Mon, 6 Apr 2020 19:15:21 +0000 (15:15 -0400)]
reftests: Comment out a test that fails only in ci
Fixing such only-in-ci failures is just too hard,
unfortunately.
Matthias Clasen [Mon, 6 Apr 2020 17:48:57 +0000 (13:48 -0400)]
Update migration guide
Rewrite the sections about keymaps and menus, and add
hints about modifiers.
Matthias Clasen [Mon, 6 Apr 2020 05:48:37 +0000 (01:48 -0400)]
accelgroup: Small documentation updates
Mention GtkShortcutTrigger, and remove references
to <Release>.
Matthias Clasen [Mon, 6 Apr 2020 05:39:17 +0000 (01:39 -0400)]
Reshuffle keymap docs
Since GdkKeymap api is on longer public, move relevant
documentation to the long description.
Matthias Clasen [Mon, 6 Apr 2020 01:43:57 +0000 (21:43 -0400)]
Drop gtk_accelerator_set_default_mod_mask
Our new approach to modifiers works with a fixed set,
there is really no need to customize the modifier
masks if the backends are all supposed to deliver
the same modifiers.
Matthias Clasen [Mon, 6 Apr 2020 00:41:26 +0000 (20:41 -0400)]
gdk: Remove gdk_keymap_get_modifier_mask
This function is no longer public and no longer used.
Matthias Clasen [Mon, 6 Apr 2020 00:39:04 +0000 (20:39 -0400)]
Remove uses of modifier intents in gdkevents.c
This removes the use of the context menu and shift group
intents in gdkevents.c. If it turns out to be important,
we need to introduce vfuncs for gdk_event_triggers_context_menu
and gdk_event_matches.
Matthias Clasen [Mon, 6 Apr 2020 00:37:32 +0000 (20:37 -0400)]
display: Remove gdk_display_get_modifier_mask
This is not used anymore.
Matthias Clasen [Mon, 6 Apr 2020 00:35:41 +0000 (20:35 -0400)]
gtk: Drop gtk_widget_get_modifier_mask
This is not used anymore.
Matthias Clasen [Sun, 5 Apr 2020 23:52:25 +0000 (19:52 -0400)]
gtk: Stop using modifier intents
Reviewing the existing settings, the only backend with
some differences in the modifier intent settings is OS X,
and we would rather have that implemented by interpreting
the existing modifiers in the appropriate way.
X11 Wayland Win32 OS X
primary ctrl ctrl ctrl mod2
mnemonic alt alt alt alt
context menu - - - ctrl
extend sel shift shift shift shift
modify sel ctrl ctrl ctrl mod2
no text alt|ctrl alt|ctrl alt|ctrl mod2|ctrl
shift group varies - - alt
GTK now uses the following modifiers:
primary ctrl
mnemonic alt
extend sel shift
modify sel ctrl
no text alt|ctrl
The context menu and shift group intents were not used
in GTK at all.
Update tests to no longer expect <Primary> to roundtrip
through the accelerator parsing and formatting code.
Matthias Clasen [Sun, 5 Apr 2020 23:33:02 +0000 (19:33 -0400)]
keymap: Remove virtual modifier mapping functions
These are not used anymore.
Drop the vfuncs and their implementations in the
broadway, x11, wayland and win32 backends as well.
Matthias Clasen [Sun, 5 Apr 2020 15:29:12 +0000 (11:29 -0400)]
gdk: Make GdkKeymap a private api
We have replacement apis in GdkDevice and GdkDisplay.
Matthias Clasen [Mon, 6 Apr 2020 20:22:01 +0000 (20:22 +0000)]
Merge branch 'misc-meson-fixes' into 'master'
Reduce useless relinking on configure and fix check for buildtype arguments
See merge request GNOME/gtk!1614
Justin van Steijn [Mon, 6 Apr 2020 19:40:22 +0000 (19:40 +0000)]
Update Dutch translation
Matthias Clasen [Mon, 6 Apr 2020 19:32:27 +0000 (15:32 -0400)]
imcontextsimple: Disable some win32-only code
This code needs to be redone differently, since keymaps are no
longer going to be exposed. There should really not be this much
ifdef-ed backend-specific code here anyway. Or any, really.
Matthias Clasen [Sun, 5 Apr 2020 14:24:07 +0000 (10:24 -0400)]
gdk: Clean up GdkModifierType
Remove MOD2..MOD5. Backends are expected to just set
the named modifiers.
Matthias Clasen [Sun, 5 Apr 2020 18:40:55 +0000 (14:40 -0400)]
gdk: Redo key events
Add all of the keyboard translation results in the key event,
so we can translate the keyboard state at the time the event
is created, and avoid doing state translation at match time.
We actually need to carry two sets of translation results,
since we ignore CapsLock when matching accelerators, in
gdk_event_matches().
At the same time, drop the scancode field - it is only ever
set on win32, and is basically unused in GTK.
Update all callers.
Matthias Clasen [Sun, 5 Apr 2020 14:25:33 +0000 (10:25 -0400)]
gtk: Remove handling of virtual modifiers
These are going away. We expect to just have
named modifiers in modifier masks now, so we
longer juggle 'real' and 'virtual' modifiers.
Matthias Clasen [Sun, 5 Apr 2020 14:23:18 +0000 (10:23 -0400)]
events: Stop doing elaborate virtual modifier handling
These are going away in the GdkModifierType cleanup.
Just compare the modifiers we got.
Matthias Clasen [Sun, 5 Apr 2020 14:08:01 +0000 (10:08 -0400)]
broadway: Stop using MOD2..MOD5
These are going away in the GdkModifierType cleanup.
Matthias Clasen [Mon, 6 Apr 2020 19:13:00 +0000 (15:13 -0400)]
win32: Stop using MODx modifiers
The win32 backend is using GDK_MOD2_MASK for AltGr,
so define GDK_MOD2_MASK locally to keep this working,
but remove any mention of GDK_MOD3_MASK,...,GDK_MOD5_MASK.
Yuri Chornoivan [Mon, 6 Apr 2020 15:46:52 +0000 (15:46 +0000)]
Update Ukrainian translation
Yuri Chornoivan [Mon, 6 Apr 2020 14:06:17 +0000 (14:06 +0000)]
Update Ukrainian translation
Matthias Clasen [Mon, 6 Apr 2020 12:47:55 +0000 (12:47 +0000)]
Merge branch 'fno-common' into 'master'
Add a missing extern, to fix building with -fno-common
See merge request GNOME/gtk!1631
Matthias Clasen [Sun, 5 Apr 2020 14:06:51 +0000 (10:06 -0400)]
wayland: Stop setting MOD2..MOD5
These are going away in the GdkModifierType cleanup.
Matthias Clasen [Sun, 5 Apr 2020 14:04:47 +0000 (10:04 -0400)]
gdk: Remove reserved bit from GdkModifierType
This really has no purpose and obscures the header.
Matthias Clasen [Sun, 5 Apr 2020 13:53:02 +0000 (09:53 -0400)]
gtk: Stop using GDK_MODx_MASK
These are never used in practice, and we never want to
see them in the UI, so stop supporting them. This is
in preparation for cleaning up GdkModifierType.
Matthias Clasen [Sun, 5 Apr 2020 13:39:03 +0000 (09:39 -0400)]
Rename GDK_MOD1_MASK to GDK_ALT_MASK
We've hardcoded Mod1 = Alt for a long time, there is
no need to keep the confusing naming around anymore.
Matthias Clasen [Mon, 6 Apr 2020 01:41:10 +0000 (21:41 -0400)]
tests: Stop using gtk_accelerator_set_default_mod_mask
This is not doing anything useful here.
Matthias Clasen [Sun, 5 Apr 2020 15:28:52 +0000 (11:28 -0400)]
testsuite: Stop using keymap apis
Matthias Clasen [Sun, 5 Apr 2020 15:03:28 +0000 (11:03 -0400)]
gtk: Use display apis for keymap mapping
This removes the last uses of GdkKeymap from GTK.
Matthias Clasen [Sun, 5 Apr 2020 05:04:20 +0000 (01:04 -0400)]
gtk: Stop using keymap apis
Stop using most keymap apis in GTK. Only a few calls
related to virtual modifiers are left.
Matthias Clasen [Sun, 5 Apr 2020 04:48:02 +0000 (00:48 -0400)]
x11: Notify new device properties
Matthias Clasen [Sun, 5 Apr 2020 04:37:51 +0000 (00:37 -0400)]
wayland: Notify new device properties
Matthias Clasen [Sun, 5 Apr 2020 15:02:50 +0000 (11:02 -0400)]
Move keymap mapping functions to GdkDisplay
We want to stop exposing GdkKeymap, so this
functionality needs a new home.
Matthias Clasen [Sun, 5 Apr 2020 15:02:21 +0000 (11:02 -0400)]
Move GdkKeymapKey to gdktypes.h
We are going to use this type in a different header.
Matthias Clasen [Sun, 5 Apr 2020 04:37:23 +0000 (00:37 -0400)]
gdk: Move modifier mask api to GdkDisplay
GdkKeymap is on the way out.
Matthias Clasen [Sun, 5 Apr 2020 04:36:42 +0000 (00:36 -0400)]
gdk: Add keymap properties to GdkDevice
GdkKeymap is on the way out.
Matthias Clasen [Sun, 5 Apr 2020 04:30:23 +0000 (00:30 -0400)]
passwordentry: Show caps lock warning more
Show the caps lock warning regardless of whether we
have the peek icon or not.
Matthias Clasen [Sun, 5 Apr 2020 00:04:42 +0000 (20:04 -0400)]
Drop some no longer used code
Matthias Clasen [Sun, 5 Apr 2020 00:03:44 +0000 (20:03 -0400)]
cell renderer accel: Use gdk_event_get_match
Matthias Clasen [Sun, 5 Apr 2020 00:02:20 +0000 (20:02 -0400)]
Add gdk_event_get_match
This is a counterpart to gdk_event_matches() that can
be used to obtain a shortcut matching an event.
Matthias Clasen [Sat, 4 Apr 2020 21:51:32 +0000 (17:51 -0400)]
Add gdk_event_matches
Move the elaborate key event matching code from
GtkShortcutTrigger to GdkEvent, which greatly reduces
the amount of keymap api use outside of GDK.
Martin Storsjö [Sun, 5 Apr 2020 19:57:22 +0000 (22:57 +0300)]
meson: Don't execute post-install.py if cross compiling
Martin Storsjö [Sat, 4 Apr 2020 21:43:16 +0000 (00:43 +0300)]
Add a missing extern, to fix building with -fno-common
With C compilers defaulting to -fcommon, this isn't an issue, but
upcoming compilers (GCC 10 and Clang 11) will default to -fno-common,
ending up with duplicate definitions of these variables.
Matthias Clasen [Sat, 4 Apr 2020 21:09:12 +0000 (21:09 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1630
Matthias Clasen [Sat, 4 Apr 2020 19:35:18 +0000 (15:35 -0400)]
gtk-demo: Fix a crash
Using the assistant demo repeatedly was crashing.
Matthias Clasen [Sat, 4 Apr 2020 16:31:43 +0000 (16:31 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
shortcuts: documentation fixes
See merge request GNOME/gtk!1628
Matthias Clasen [Sat, 4 Apr 2020 16:31:43 +0000 (16:31 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
shortcuts: documentation fixes
See merge request GNOME/gtk!1628
Matthias Clasen [Sat, 4 Apr 2020 15:38:47 +0000 (11:38 -0400)]
shortcuts: documentation fixes
Update symbol lists, and add examples for parsing triggers
and actions.
Piotr Drąg [Sat, 4 Apr 2020 09:56:04 +0000 (11:56 +0200)]
Update POTFILES.skip
Matthias Clasen [Sat, 4 Apr 2020 05:00:22 +0000 (05:00 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1626
Matthias Clasen [Fri, 3 Apr 2020 21:42:22 +0000 (17:42 -0400)]
colorbutton: Don't add a customize menu
The color swatch in the button does not need a
context menu. Turn it off.
Matthias Clasen [Fri, 3 Apr 2020 21:39:49 +0000 (17:39 -0400)]
colorbutton: Fix focus
The colorbutton contains a button which contains a colorswatch.
We want the focus to go straight to the button, nowhere else,
so mark the swatch as !can-focus.
Adapt tests to match.
Matthias Clasen [Mon, 30 Mar 2020 00:35:17 +0000 (20:35 -0400)]
demos: Remove can-focus from ui files
Matthias Clasen [Sat, 4 Apr 2020 04:03:40 +0000 (04:03 +0000)]
Merge branch 'scrollbar-a11y' into 'master'
Add GtkScrollbarAccessible
See merge request GNOME/gtk!1623
Matthias Clasen [Sat, 4 Apr 2020 03:31:45 +0000 (23:31 -0400)]
scrollbar: Be more defensive
Somehow the scrollbar accessible manages to call
gtk_scrollbar_get_adjustment when priv->range is NULL.
Survive taht.
Matthias Clasen [Sat, 4 Apr 2020 03:12:10 +0000 (03:12 +0000)]
Merge branch 'shortcut-action-parse' into 'master'
Shortcut action parse
See merge request GNOME/gtk!1625
Matthias Clasen [Sat, 4 Apr 2020 02:42:00 +0000 (22:42 -0400)]
testsuite: Add tests for parsing shortcut actions
Matthias Clasen [Sat, 4 Apr 2020 02:41:15 +0000 (22:41 -0400)]
Add an api to parse shortcut actions
This is so we can test this code. While doing it
I also fixed the missing else that was caused it
not to work.
Matthias Clasen [Fri, 3 Apr 2020 19:14:26 +0000 (15:14 -0400)]
Add GtkScrollbarAccessible
When GtkScrollbar stopped being a GtkRange,
GtkRangeAccessible stopped working for scrollbars.
Update a11y tests to match.
Carlos Garnacho [Fri, 3 Apr 2020 18:37:44 +0000 (18:37 +0000)]
Merge branch 'wip/carlosg/fix-surrounding-text-master' into 'master'
imwayland: Clamp the surrounding string end correctly
Closes #2565
See merge request GNOME/gtk!1621
Matthias Clasen [Fri, 3 Apr 2020 18:23:27 +0000 (18:23 +0000)]
Merge branch 'focus-test' into 'master'
Focus test
See merge request GNOME/gtk!1622
Carlos Garnacho [Fri, 3 Apr 2020 10:44:37 +0000 (12:44 +0200)]
imwayland: Clamp the surrounding string end correctly
In the paths where len > MAX_LEN and cursor/anchor are separated by
at least MAX_LEN from text edges, we were clamping the right end of
the surrounding string at MAX_LEN. Oops.
This end anchor may go as far as the string length, although just
up to len - MAX_LEN in real terms (due to the condition above that
caches cursor/anchor positions being near enough the text end).
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2565
(cherry-picked from commit
d7fb15c822eabe22ffda19892153d69b0f4fc2f3)
Matthias Clasen [Fri, 3 Apr 2020 13:36:19 +0000 (09:36 -0400)]
testsuite: Add a big focus chain testcase
Matthias Clasen [Fri, 3 Apr 2020 15:22:00 +0000 (11:22 -0400)]
testsuite: Try harder to record a full focus chain
It is hard to avoid widgets with the same name in a
large ui file - try harder to record a full focus chain
before decide that we've wrapped, by including the widget
address in the comparison. Note that we don't include
the addresses in the generated output, since that would
make expected output vary from run to run.
Emmanuele Bassi [Fri, 3 Apr 2020 15:21:59 +0000 (15:21 +0000)]
Merge branch 'gir-fixes' into 'master'
Annotation fixes
See merge request GNOME/gtk!1616
Matthias Clasen [Fri, 3 Apr 2020 15:03:51 +0000 (15:03 +0000)]
Merge branch 'move-gdkgrab-decl' into 'master'
gdk: Move GdkGrabStatus and GdkGrabOwnership decl.
See merge request GNOME/gtk!1615
Emmanuele Bassi [Fri, 3 Apr 2020 14:30:56 +0000 (15:30 +0100)]
Annotation fixes
Match the arguments name in the declaration and the definition, and make
sure we have the proper transfer annotations.
Olivier Fourdan [Fri, 3 Apr 2020 13:19:37 +0000 (15:19 +0200)]
gdk: Move GdkGrabStatus and GdkGrabOwnership decl.
With the removal of `gdk_seat_grab` we do not need to keep the
definitions of `GdkGrabStatus` and `GdkGrabOwnership` public.
Move those definitions to become internal only.
Nirbheek Chauhan [Fri, 3 Apr 2020 12:02:51 +0000 (17:32 +0530)]
meson: Fix check for builtype arguments
`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.
For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
Nirbheek Chauhan [Fri, 3 Apr 2020 11:58:18 +0000 (17:28 +0530)]
meson: Reduce useless relinking on reconfigure
When we reconfigure, `configure_file()` is called again, and
`*.gresource.xml` files are regenerated, which causes many (all?)
binaries to be relinked. Now we only write those out if the contents
actually changed (or if the output didn't already exist).
This is exactly what Meson already does with `configure_file()` when
`command:` is not used.
While we're at it, also do the same for `gen-c-array.py` and
`gentypefuncs.py` for completeness. Now even if the input to those
changes, re-building of those custom targets may not result in
relinking if the outputted C files have the same contents.
Timm Bäder [Fri, 3 Apr 2020 06:03:32 +0000 (08:03 +0200)]
shortcutcontroller: fix transfer full annotation
Timm Bäder [Fri, 3 Apr 2020 05:37:54 +0000 (07:37 +0200)]
window: Don't leak toplevel layout
Matthias Clasen [Fri, 3 Apr 2020 01:07:14 +0000 (01:07 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1611